<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Insert title here</title>
<script>
 function myfn(){
	 for (i=1;i<=9;i++){
	 for (j=1;j<=i;j++) 
	document.write(i,"*",j,"=",i*j+"&nbsp");
	document.write("<br>");
		 }
 }
</script>
</head>
<body>
<input type="button" value="添加" onclick="myfn()">
<div id="d1"></div>
</body>
</html>